package common.utils
{
	import flash.utils.Dictionary;
	
	import mx.rpc.soap.WebService;

	public class ServiceManager
	{
		private var _server:String;
		private var _wsdlList:Dictionary;
		
		public function ServiceManager(stWSServer:String)
		{
			this._server = stWSServer;
			this._wsdlList = new Dictionary();
		}
		
		public function GetServiceInstance(stServiceName:String){
			if (this._wsdlList[stServiceName] == null){
				var ws:WebService = new WebService();
				ws.loadWSDL("http://" + this._server + "/SCV_APP/" + stServiceName);
				this._wsdlList[stServiceName] = ws; 
			}
			return this._wsdlList[stServiceName];
		}
	}
}